Repository navigation
[Improve][CI] Refine Merge Queue fallback and documentation - #11970
Conversation
|
@davidzollo can you help me review this PR? thanks very much🚀 |
DanielLeens
left a comment
There was a problem hiding this comment.
What Problem Does This PR Solve?
This is a same-day follow-up to #11963 (which introduced the Merge Queue for dev, merged 2026-08-26). It refines three things the earlier review flagged: it drops the nick-fields/retry@v3 wrapper around the two Maven compile steps in the Merge Queue workflow so a deterministic compilation failure is reported immediately instead of being masked by up to two extra retry attempts, it wires the ASF Infra apache/root team in as a bypass_actors last-resort recovery path for the Merge Queue ruleset, and it adds a bilingual (EN/ZH) contributor guide explaining how to use, diagnose, and recover the queue. No SeaTunnel runtime code, public API, or released-version behavior is touched.
1. Code Change Review
1.1 Core Logic Analysis
.github/workflows/merge_queue.yml:47-56 — both Compile main and test sources and Compile benchmark main and test sources steps changed from uses: nick-fields/retry@v3 (max_attempts: 3, per-attempt timeout 28/8 min) to plain run: blocks with the exact same Maven commands/arguments unchanged. I checked the interaction with the job-level timeout-minutes: 30 (merge_queue.yml:34): a first-attempt compile failure that surfaces quickly (e.g. an early dependency-resolution error) would still have left room for a retry under the old wrapper, but a failure that surfaces late (the common case for a real compilation error, which fails only after most of the reactor has already built) left effectively no budget for the wrapper's remaining attempts before the 30-minute job timeout killed the whole job anyway. So the retry wrapper was already only partially effective for its stated purpose, and removing it trades that partial transient-failure resilience for immediate, unambiguous failure reporting — a reasonable choice specifically for a merge-queue gate, where a stuck/retried failure blocks the whole queue rather than just one PR's own CI. This is also a small supply-chain-surface win (removes a pinned third-party Action).
.asf.yaml:57-61 — adds bypass_actors: [{actor_id: 118420, actor_type: Team, bypass_mode: always}] to the Merge Queue ruleset (previously []). I independently verified actor_id: 118420 against other live ASF repos' .asf.yaml (apache/texera, apache/infrastructure-github-merge-queue-notifier, both found via gh api search/code) — both use the identical actor_id: 118420 / actor_type: Team pattern labeled "apache/root — ASF Infra team," so this is a real, consistent ASF-wide ID, not a guess. bypass_mode: always (vs. pull_request) correctly means the bypass applies to direct pushes as well as PR merges for this specific ruleset, matching what the new docs claim. This ruleset only carries a merge_queue rule; the separate protected_branches.dev.required_status_checks/required_pull_request_reviews block is untouched, so the PR description's claim that Build/approval requirements "continue to be evaluated independently" of this bypass is accurate.
1.2 Compatibility Impact
Fully compatible. No runtime code, API, config schema, or serialization format is touched; this only affects GitHub-side CI/ruleset behavior for the unreleased dev branch.
1.3 Performance / Side-Effect Analysis
Net effect on the merge queue: faster, unambiguous failure signal on real compile breaks (no wasted 2x retry cycles occupying the queue slot); slightly reduced auto-resilience against a same-attempt transient network blip during dependency download, which the new docs explicitly compensate for by instructing "select Merge when ready again" for confirmed transient infra failures (docs/en/developer/merge-queue.md, "Recover and Requeue" section). No CPU/memory/GC/lock-contention concerns — this is pure CI orchestration.
1.4 Error Handling and Logging
No formal issues found.
2. Code Quality Assessment
2.1 Coding Standards
N/A — no Java/production code in this diff (YAML workflow config, .asf.yaml, Markdown docs).
2.2 Test Coverage and Test Stability
Not applicable: no UT/E2E source test files are touched. Rating: Stable — the changed behavior is declarative CI/ruleset config, cross-verified against the live workflow file and other ASF repos' equivalent config rather than merely asserted in the PR description.
2.3 Documentation Updates
Both docs/en/developer/merge-queue.md and docs/zh/developer/merge-queue.md are new, registered once in docs/sidebars.js (matches the existing convention already used by sibling docs like developer/coding-guide, which also has both an en and zh file under one shared sidebar id). I cross-checked every concrete number/step name in the docs against the actual files: the "30-minute limit" row matches timeout-minutes: 30; the step names Compile main and test sources / Compile benchmark main and test sources match the workflow exactly; the check_response_timeout_minutes: 45 reference in .asf.yaml's comment matches the doc's implicit assumption. EN/ZH content is in parity. No gaps found.
3. Architectural Soundness
3.1 Elegance of the Solution
Precise, minimal fix — each of the three changes (retry removal, bypass wiring, docs) is scoped exactly to what #11963's review called for, with no scope creep.
3.2 Maintainability
Good — the docs turn "the merge queue is stuck" from tribal knowledge into a runnable classification table and recovery procedure, which should reduce load on whoever handles ASF Infra escalations.
3.3 Extensibility
N/A for this scope.
3.4 Historical-Version Compatibility
N/A — dev is unreleased; no released version or upgrade path is affected.
4. Issue Summary
No issues found.
| Number | Issue | Location | Severity |
|---|---|---|---|
| - | None | - | - |
5. Merge Recommendation
Conclusion: Ready to merge
-
Blockers — must be fixed
- None.
-
Recommended fixes — non-blocking
- Purely optional: the
.asf.yamlcomment above the bypass entry could additionally note thatbypass_mode: alwaysdeliberately covers direct pushes too (the new doc already explains this well, so this would just save a reader a hop between the two files).
- Purely optional: the
Overall assessment: This is a careful, well-evidenced follow-up. I independently verified the two claims that mattered most — that actor_id: 118420 really is the ASF-wide apache/root team ID (confirmed against two other live ASF .asf.yaml files) and that the new docs' concrete numbers/step names match the actual workflow/ruleset values rather than drifting from them. Both check out. The retry-wrapper removal is a defensible, explicitly-justified tradeoff for a merge-queue gate specifically (fast unambiguous failure over partial transient-failure masking), and the docs' "Recover and Requeue" section already covers the transient-failure case that the retry used to (partially) automate. No blocking issues. Nice work, and thanks for following up so promptly on the earlier review feedback.
DanielLeens
left a comment
There was a problem hiding this comment.
Thank you for the quick follow-up, @nzw921rx — re-reviewing from scratch against the latest head (6c09c436e4e) since two new commits landed after my prior approval of 356333a0a4.
What Problem Does This PR Solve?
This is a same-day follow-up to #11963 (which introduced the Merge Queue for dev). It refines the Merge Queue safeguards and documentation: it drops the nick-fields/retry@v3 wrapper around the two Maven compile steps so a real compilation failure is reported immediately, wires the ASF Infra apache/root team in as a bypass_actors last-resort recovery path, adds a bilingual (EN/ZH) contributor guide, and — in the two commits pushed since my last approval — extends check_response_timeout_minutes from 45 to 120 to give the 30-minute Build job more headroom against runner-scheduling delays. No SeaTunnel runtime code, public API, or released-version behavior is touched.
1. Code Change Review
1.1 Core Logic Analysis
Everything reviewed in my prior approval (.github/workflows/merge_queue.yml:47-56 retry-wrapper removal, .asf.yaml bypass_actors wiring for apache/root/actor_id: 118420) is byte-for-byte unchanged since 356333a0a4 — I re-diffed dev...HEAD and confirmed those hunks are identical to what I already verified against two other live ASF .asf.yaml files.
The two new commits (5d14279954c, 6c09c436e4e) touch exactly one thing, .asf.yaml:69-70:
- # Leave time for runner scheduling and status reporting around the 30-minute job.
- check_response_timeout_minutes: 45
+ # Allow enough time for runner scheduling before the 30-minute job starts.
+ check_response_timeout_minutes: 120
I checked this specifically for the failure-masking risk the task flagged: check_response_timeout_minutes is GitHub's "maximum time for a required check to report any conclusion" watchdog on the merge_queue rule — it only fires when the check never reports back (e.g. the merge_group run never starts, or sits queued waiting for a runner). It has no effect on a check that does complete: a Build job that finishes and reports failure is acted on by the queue immediately regardless of this value, and the job itself is still hard-capped by timeout-minutes: 30 in merge_queue.yml:34, so a real compile failure or a genuinely hung Maven step still surfaces within 30 minutes. So this change does not let a real CI failure "slip through" the queue — it only widens the window before a non-responding check is treated as failed, which is exactly the class of false-ejection this doc set is meant to fix. The value is comment-consistent (still references "the 30-minute job") and within GitHub's valid range (1–1440 minutes).
Runtime path: merge_group event → Merge Queue workflow (merge_queue.yml) → Build job (30-min hard cap) → GitHub's ruleset watchdog either (a) sees a conclusion before 120 min and acts on it immediately, or (b) times out after 120 min with no conclusion at all and ejects the entry as a "queue/runner-scheduling" failure per the new doc's classification table.
1.2 Compatibility Impact
Fully compatible. Only GitHub-side ruleset/workflow config for the unreleased dev branch; no runtime code, config schema, or serialization format touched.
1.3 Performance / Side-Effect Analysis
Net effect of the new commits: fewer false ejections caused by transient runner-scheduling congestion (the presumed reason 45 minutes proved too tight in practice). The trade-off worth naming for the record: if the merge_group run genuinely never starts (e.g. an Actions outage or a workflow-trigger misconfiguration), an entry can now occupy a queue slot for up to 120 minutes instead of 45 before being ejected, which — combined with grouping_strategy: ALLGREEN and max_entries_to_build: 5 — could hold up to 5 batched PRs longer than before in that specific worst case. This is a reasonable, deliberate operational trade-off (not a logic bug), and it is bounded and comment-documented, so I'm not treating it as a blocker; flagging it purely as a known-and-accepted cost.
1.4 Error Handling and Logging
No formal issues found. No numeric timeout value is asserted in docs/en|zh/developer/merge-queue.md (the doc only references the fixed 30-minute job cap, which is unaffected by this change), so the new 45→120 bump does not desynchronize the docs from the actual ruleset — I checked this explicitly since it was the specific risk called out for this re-review.
2. Code Quality Assessment
2.1 Coding Standards
N/A — no Java/production code in this diff (YAML workflow config, .asf.yaml, Markdown docs). The inline comment above check_response_timeout_minutes was kept accurate and concise across both new commits.
2.2 Test Coverage and Test Stability
Not applicable: no UT/E2E source files touched. Rating: Stable — declarative CI/ruleset config, cross-verified against the actual workflow file rather than merely asserted.
2.3 Documentation Updates
No doc changes were needed for, or made by, the two new commits, and none are missing: as noted above, the docs never hardcoded the specific check_response_timeout_minutes value, only the fixed 30-minute job limit, so there is nothing to keep in sync.
3. Architectural Soundness
3.1 Elegance of the Solution
Precise, minimal fix — a single-parameter tuning change plus a comment simplification, scoped exactly to the observed problem (runner-scheduling delays tripping the 45-minute watchdog).
3.2 Maintainability
Good — the final comment wording is clear and doesn't overstate what the timeout does.
3.3 Extensibility
N/A for this scope.
3.4 Historical-Version Compatibility
N/A — dev is unreleased; no released version or upgrade path is affected.
4. Issue Summary
No issues found.
| Number | Issue | Location | Severity |
|---|---|---|---|
| - | None | - | - |
5. Merge Recommendation
Conclusion: Ready to merge
-
Blockers — must be fixed
- None.
-
Recommended fixes — non-blocking
- None beyond the previously-noted optional doc cross-reference from my prior review, which remains purely optional.
Overall assessment: I re-verified the full current diff against dev from scratch, not just the incremental commits, and confirmed the parts I approved on 2026-08-26 are unchanged. The two new commits are a narrowly-scoped, well-justified timeout tuning change with no failure-masking effect — I specifically traced how check_response_timeout_minutes interacts with the job's own 30-minute hard cap and the queue's failure handling to confirm a real Build failure is still caught immediately, and confirmed the docs make no numeric claim that the new value would contradict. CI (Build, Notify test workflow, labeler) is green on the current head 6c09c436e4e. No blocking issues. Approving again.
Purpose of this pull request
This PR follows up on #11963 and incorporates the review conclusions:
Remove the retry wrapper from the two Maven compilation steps. A retry cannot reliably distinguish a temporary dependency-download failure from a deterministic compilation failure introduced by the queued change, so the original failure should be reported directly.
Configure the ASF Infra
apache/rootteam as the emergency fallback for the Merge Queue ruleset. This uses the same team ID as existing ASF configurations and is intended only as a last-resort recovery path when the queue remains unavailable after normal troubleshooting.Add English and Chinese contributor guides covering:
merge_groupworkflow run;The Merge Queue ruleset remains separate from the existing classic branch protection. The required pull-request
Buildand approval requirements continue to be evaluated independently.Does this PR introduce any user-facing change?
Yes. It changes the repository-level Merge Queue recovery configuration for the unreleased
devbranch and adds contributor-facing operational documentation.It does not change SeaTunnel runtime behavior, public APIs, or released versions.
How was this patch tested?
The underlying Merge Queue build completed successfully in [GitHub Actions run 32937109261](https://github.com/apache/seatunnel/actions/runs/32937109261).
The following configuration and documentation changes were also reviewed:
bypass_actorsstructure was compared with existing ASF.asf.yamlconfigurations using theapache/rootteam.Check list
If any new Jar binary package adding in your PR, please add License Notice according
[New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
If necessary, please update
incompatible-changes.mdto describe the incompatibility caused by this PR.If you are contributing the connector code, please check that the following files are updated: